package com.ah.shanxi_demo.mapper;

import com.ah.shanxi_demo.common.MyMapper;
import com.ah.shanxi_demo.entity.SxPolicy;
import com.ah.shanxi_demo.param.input.PolicyPO;
import com.ah.shanxi_demo.param.result.PolicyDataReportMapperPO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public interface SxPolicyMapper extends MyMapper<SxPolicy> {

    List<SxPolicy> listBySelect(PolicyPO policyPO);

    Integer listCountBySelect(PolicyPO policyPO);

    Boolean deletePolicy(@Param("policyId") Long policyId);

    SxPolicy selectById(@Param("policyId") Long policyId);

    String generalFinish(@Param("registerId") Long registerId);

    String generalUnFinish(@Param("registerId") Long registerId);

    Boolean updateStatus(@Param("policyStatus") Integer policyStatus, @Param("policyId") Long policyId);

    Long insertPolicy(SxPolicy sxPolicy);

    Integer selectByRepeat(SxPolicy sxPolicy);

    PolicyDataReportMapperPO selectDataReportByPolicyId(@Param("policyId") Long policyId);

}
